module TeamSchnitzel
  module ConfigurationFu
    def self.load_application_configuration_file
      data = YAML::load(ERB.new((IO.read("#{RAILS_ROOT}/config/application.yml"))).result) rescue nil
      if data
        return data[RAILS_ENV] || data['default']
      end
    end
  end
end

Kernel::APP_CONFIG = TeamSchnitzel::ConfigurationFu::load_application_configuration_file
